/**
 * <b>项目名称：</b>网络应用框架<br/>
 * <b>包    名：</b>com.hhwy.framework.datasource.domain<br/>
 * <b>文 件 名：</b>DatasourceDomain.java<br/>
 * <b>版本信息：</b><br/>
 * <b>日    期：</b>2014年8月4日-下午2:57:42<br/>
 * <b>Copyright (c)</b> 2014恒华伟业科技股份有限公司-版权所有<br/>
 * 
 */
package com.hhwy.framework.datasource.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import com.hhwy.framework.common.Constants;
import com.hhwy.framework.persistent.entity.Domain;

 /**
 * <b>类 名 称：</b>DatasourceDomain<br/>
 * <b>类 描 述：</b><br/>
 * <b>创 建 人：</b>lihuiming<br/>
 * <b>修 改 人：</b>Administrator<br/>
 * <b>修改时间：</b>2014年8月4日 下午2:57:42<br/>
 * <b>修改备注：</b><br/>
 * @version 1.0.0<br/>
 */
@Entity(name="DatasourceConfig")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Table(name=Constants.DATASOURCE_CONFIG_TABLE)
public class DatasourceConfig extends Domain{

	 /**
	 * serialVersionUID
	 * @return  the serialVersionUID
	 * @since   1.0.0
	*/
	private static final long serialVersionUID = 870065976381058952L;
	@Column(name="url")
	private String url ;
	@Column(name="driver")
	private String driver;
	@Column(name="user_name")
	private String userName;
	@Column(name="password")
	private String password;
	@Column(name="initial_size")
	private Integer initialSize =1;
	@Column(name="max_active")
	private Integer maxActive = 1;
	@Column(name="min_idle")
	private Integer minIdle = 1;
	@Column(name="time_millis")
	private Integer timeBetweenEvictionRunsMillis = 60000;
	@Column(name="min_millis")
	private Integer minEvictableIdleTimeMillis = 25200000;
	@Column(name="remove_abandoned")
	private boolean removeAbandoned = true;
	@Column(name="remove_timeout")
	private Integer removeAbandonedTimeout = 1800;
	@Column(name="test_on_borrow")
	private boolean testOnBorrow = false;
	@Column(name="test_on_return")
	private boolean testOnReturn = false;
	@Column(name="test_while_idle")
	private boolean testWhileIdle = true;
	@Column(name="validation_query")
	private String validationQuery = "select 1";
	@Column(name="filters")
	private String filters = "stat";
	@Column(name="app_name")
	private String appName ;
	
	
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getDriver() {
		return driver;
	}
	public void setDriver(String driver) {
		this.driver = driver;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getInitialSize() {
		return initialSize;
	}
	public void setInitialSize(Integer initialSize) {
		this.initialSize = initialSize;
	}
	public Integer getMaxActive() {
		return maxActive;
	}
	public void setMaxActive(Integer maxActive) {
		this.maxActive = maxActive;
	}
	public Integer getMinIdle() {
		return minIdle;
	}
	public void setMinIdle(Integer minIdle) {
		this.minIdle = minIdle;
	}
	public boolean isRemoveAbandoned() {
		return removeAbandoned;
	}
	public void setRemoveAbandoned(boolean removeAbandoned) {
		this.removeAbandoned = removeAbandoned;
	}
	public Integer getRemoveAbandonedTimeout() {
		return removeAbandonedTimeout;
	}
	public void setRemoveAbandonedTimeout(Integer removeAbandonedTimeout) {
		this.removeAbandonedTimeout = removeAbandonedTimeout;
	}
	public boolean isTestOnBorrow() {
		return testOnBorrow;
	}
	public void setTestOnBorrow(boolean testOnBorrow) {
		this.testOnBorrow = testOnBorrow;
	}
	public boolean isTestOnReturn() {
		return testOnReturn;
	}
	public void setTestOnReturn(boolean testOnReturn) {
		this.testOnReturn = testOnReturn;
	}
	public boolean isTestWhileIdle() {
		return testWhileIdle;
	}
	public void setTestWhileIdle(boolean testWhileIdle) {
		this.testWhileIdle = testWhileIdle;
	}
	public String getAppName() {
		return appName;
	}
	public void setAppName(String appName) {
		this.appName = appName;
	}
	
	public Integer getTimeBetweenEvictionRunsMillis() {
		return timeBetweenEvictionRunsMillis;
	}
	public void setTimeBetweenEvictionRunsMillis(Integer timeBetweenEvictionRunsMillis) {
		this.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
	}
	public Integer getMinEvictableIdleTimeMillis() {
		return minEvictableIdleTimeMillis;
	}
	public void setMinEvictableIdleTimeMillis(Integer minEvictableIdleTimeMillis) {
		this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
	}
	public String getFilters() {
		return filters;
	}
	public void setFilters(String filters) {
		this.filters = filters;
	}
	public String getValidationQuery() {
		return validationQuery;
	}
	public void setValidationQuery(String validationQuery) {
		this.validationQuery = validationQuery;
	}
	
	
}